// 提交数据 对state数据做修改

const mutations = {
  // 修改播放状态 第一个参数是state， 第二个参数是要修改为的值
  setPlayingState(state, playing) {
    state.playing = playing
  },
  // 设置顺序(原始)播放列表
  setSequenceList(state, list) {
    state.sequenceList = list
  },
  // 设置播放列表 当有随机播放情况的时候，playlist和sequencelist就会不同
  setPlaylist(state, list) {
    state.playlist = list
  },
  // 设置播放模式
  setPlayMode(state, mode) {
    state.playMode = mode
  },
  // 设置当前播放索引
  setCurrentIndex(state, index) {
    state.currentIndex = index
  },
  // 设置播放器全屏或者折叠模式
  setFullScreen(state, fullScreen) {
    state.fullScreen = fullScreen
  }
}

export default mutations
